<template>
<<<<<<< HEAD
  <div>我是注册页</div>
</template>
=======
  <div class="zhuce">
    <div class="fanhui" @click="fanhui">返回</div>
    <div class="wenzi">手机号注册</div>

    <!-- 写主题内容 -->
    <form action="">
      <div class="shojihao">
        <input
          type="text"
          placeholder="请输入您的手机号"
          v-model="mobile"
          @blur="checkPhone"
          id="phone"
        />
      </div>
      <div class="yanzhengma">
        <input type="text" placeholder="请输入您的验证码" v-model="yzmval" />
        <!-- <span @click="send_sms">{{ sms_interval }}</span> -->
        <span @click="hqyzm">{{ sms_interval }}</span>
      </div>
    </form>

    <!-- 获取验证码后点击进行注册 -->
    <div class="foot">
      <!-- <span @click="register"> 下一步 </span> -->
      <span @click="xiayibu"> 下一步 </span>
    </div>
  </div>
  <!-- <router-view /> -->
</template>

<script>
export default {
  data() {
    return {
      mobile: "",
      password: "",
      sms_interval: "获取验证码",
  
    };
  },

  // 对注册写入方法
  methods: {
    fanhui(){
      this.$router.push('/login')
    },
    checkPhone() {
      var phone = document.getElementById("phone").value;
      if (!/^(?:(?:\+|00)86)?1[3-9]\d{9}$/.test(phone)) {
        alert("手机号码有误，请重新再输入一次");
      } else {
        console.log("value", this);
      }
    },
    hqyzm() {
      if (!this.mobile) {
        alert("手机号不能为空");
      } else {
        console.log(this.mobile);
      }
    },
    xiayibu() {
      if (!this.mobile) {
        alert("请输入您的手机号");
        return;
      } else if (!this.yzmval) {
        alert("验证码不能为空");
      } else{
         this.$router.push('/login')
      }
    },
  },
};
</script>

<style lang="less" scpoed>
@import "../assets/css/var.less";
.zhuce {
  .fanhui {
    color: #68dcdc;
    font-size: 15px;
    margin-top: 20px;
    margin-left: 10px;
    margin-bottom: 40px;
  }
  .wenzi {
    width: 100%;
    // background:pink;
    text-align: center;
    color: #605e62;
    // font-weight:600;
    font-size: 25px;
    margin-bottom: 40px;
  }
  .shojihao {
    margin: auto;
    width: 80%;
    height: 40px;
    border-radius: 8px;
    margin-bottom: 15px;
    // background:pink;

    input {
      display: block;
      width: 100%;
      height: 100%;
      border-radius: 8px;
    }
  }
  .yanzhengma {
    display: flex;
    width: 80%;
    margin: auto;
    justify-content: space-between;
    margin-bottom: 60px;
    //  background:pink;
    height: 40px;
    input {
      border-radius: 5px;
    }
    span {
      border: 1px solid black;
      width: 100px;
      height: 40px;
      line-height: 40px;
      text-align: center;
      border-radius: 3px;
      font-weight: 600;
      font-size: 14px;
    }
  }
  .foot {
    width: 80%;
    margin: auto;
    background: #68dcdc;
    text-align: center;
    color: white;
    font-size: 15px;
    height: 40px;
    line-height: 40px;
  }
}
</style>
>>>>>>> 517d897f7297e3234eaea68f98ff6168e5feb1e7
